<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script th:src="@{/layer/JQuery/jquery-3.1.1.min.js}"></script>
    <script th:src="@{/layer/layer/layer.js}"></script>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"/>
    <script th:src="@{/layui/layui.js}"></script>

    <style>
        .layui-btn {
            margin-right: 25px;
        }

        html {
            background: url() no-repeat;
            background-size: 100% 100%;
            height: 100%;
            width: 100%;
        }

        .layui-form {
            padding: 40px 0 10px 5px;
            padding-left: 30px;
            width: 350px;
            margin: 50px auto;
            background-color: rgba(0, 0, 0, 0.1);
            box-shadow: 0 0 10px 10px rgba(255, 255, 255, 0.2);
        }

        .layui-form-label {
            display: block;
            background: #33cccc;
            height: 20px;
            width: 45px;
            color: white;
            padding-left: 0px;
            font-size: 24px;
        }

        .layui-input-block {
            margin-left: 45px;
            height: 38px;
            border-radius: 2px;
            width: 220px;
            padding-left: 30px;
        }

        .layui-form-item .layui-input-inline, .layui-input-inline {
            width: 250px;
        }

        .layui-form-radio > i:hover, .layui-form-radioed > i {
            color: #33cccc;
        }

        .layui-form-select dl dd.layui-this {
            background-color: #33cccc;
        }
    </style>

</head>

<body>
<form class="layui-form" th:action="@{/user}" method="post">
    <input type="hidden" name="_method" value="put"/>

    <div class="layui-form-item">
        <label class="layui-form-label layui-icon layui-icon-username"></label>
        <div class="layui-input-inline">
            <input type="tel" name="uid" lay-verify="required" autocomplete="off"
                   th:value="${session.loginUser.uid}" class="layui-input" readonly>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label layui-icon layui-icon-triangle-r"></label>
        <div class="layui-input-inline">
            <input type="tel" name="upwd" lay-verify="required" autocomplete="off"
                   placeholder="请输入旧密码" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label layui-icon layui-icon-triangle-r"></label>
        <div class="layui-input-inline">
            <input type="text" name="umemo" lay-verify="required" autocomplete="off"
                   class="layui-input" placeholder="请输入新密码"  maxlength="64">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" id="modifybutton" lay-submit="" lay-filter="demo" style="background-color: #33cccc">修改</button>
            <a th:href="@{/dashboard.html}">
                <input type="button" class="layui-btn layui-btn-primary" value="返回" ></input>
            </a>
        </div>
    </div>

</form>

<script>
    layui.use('form', function () {
        var form = layui.form;
        //监听提交
        form.on('submit(formDemo)', function (data) {
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });


</script>
</body>

</html>